package com.example.dao;

import com.example.mapper.RuleMapper;
import com.example.model.Rule;
import com.example.model.VipRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RuleDao {
    @Autowired
    private RuleMapper ruleMapper;

    public VipRule findRulesByVipRuleLevel(String level){
        return ruleMapper.selectVipRuleByLevel(level);
    }

    public List<Rule> findRulesByVipRuleId(Long vipRuleId){
        return ruleMapper.selectRulesByVipRuleId(vipRuleId);
    }
}
